// 经纪接口
import request from '@/utils/request'
// 获取经纪列表
export const managerList = (params) => request({
  url: '/agents',
  params
})

// 获取经纪数量
export const numberManager = (params) => request({
  url: '/agents/count',
  params
})

// 新建经纪
export const addmanager = (data) => request({
  url: '/agents',
  method: 'post',
  data
})

// 删除经纪
export const deletemanager = (id) => request({
  url: '/agents/' + id,
  method: 'delete'
})

// 获取指定经纪
export const getManager = (id) => request({
  url: '/agents/' + id
})

// 编辑经纪
export const editManager = (data) => request({
  url: '/agents/' + data.id,
  method: 'put',
  data
})
